<template>
  <div class="centextBar" id="banner_edit" v-cloak style="height:100%">
    <div class="title">
      <div class="title">新增</div>
      <div class="buttonBar float-right">
      </div>
      <div class="clear"></div>
    </div>

    <div class="tableBox">

      <table class="detail-table">
        <tbody>
        <tr>
          <td style="background-color:rgba(255, 255, 255, 1);text-align: center" class="v-label">登录名:</td>
          <td style="background-color:rgba(255, 255, 255, 1);text-align:left;" class="text-grey">
            <input id="userName" type="text"
                   class="searchTxt" oninput="this.value=this.value.replace(/[\u4e00-\u9fa5]/g,'')"
                   onkeyup="this.value=this.value.replace(/^ +| +$/g,'')"/>
          </td>
          <td style="vertical-align:middle;background-color:rgba(255, 255, 255, 1);">
            <div style="float: left;margin-left: -30%;">
              <span id="erruName" style="float:left;font-size:12px;color: #ff1022"></span>
            </div>
          </td>
        </tr>
        <tr>
          <td class="v-label" style="background-color:rgba(255, 255, 255, 1);;text-align: center">用户姓名:</td>
          <td class="text-grey" style="text-align:left;background-color:rgba(255, 255, 255, 1);">
            <input id="displayName" type="text"
                   class="searchTxt"
                   onkeyup="this.value=this.value.replace(/^ +| +$/g,'')"/>
          </td>
          <td style="vertical-align:middle;background-color:rgba(255, 255, 255, 1);">
            <div style="float: left;margin-left: -30%;">
              <span id="errdpn" style="float:left;font-size:12px;color: #ff1022"></span>
            </div>
          </td>
        </tr>
        <tr>
          <td class="v-label" style="background-color:rgba(255, 255, 255, 1);text-align: center">联系电话:</td>
          <td class="text-grey" style="text-align:left;background-color:rgba(255, 255, 255, 1);">
            <input id="phoneNumber" type="text"
                   class="searchTxt"
                   onkeyup="this.value=this.value.replace(/^ +| +$/g,'')"/>
          </td>
          <td style="vertical-align:middle;background-color:rgba(255, 255, 255, 1);">
            <div style="float: left;margin-left: -30%;">
              <span id="errpn" style="float:left;font-size:12px;color: #ff1022"></span>
            </div>
          </td>
        </tr>
        <tr>
          <td style="text-align: center" class="v-label">密码:</td>
          <td class="text-grey" style="text-align:left;">
            <input id="password" type="text"
                   class="searchTxt"
                   onkeyup="this.value=this.value.replace(/^ +| +$/g,'')"/>
          </td>
          <td style="vertical-align:middle;">
            <div style="float: left;margin-left: -30%;">
              <span id="errpd" style="float:left;font-size:12px;color: #ff1022"></span>
            </div>
          </td>
        </tr>
        <tr>
          <td class="v-label" style="background-color:rgba(255, 255, 255, 1);text-align: center">状态:</td>
          <td class="content" style="text-align:left;height:66px;background-color:rgba(255, 255, 255, 1);">
            <select id="status"
                    class="form-control" style="text-align: center;width: 301px;margin-left:8px;">
              <option value="EFFECT" selected="selected">有效</option>
              <option value="LOSE_EFFECT">无效</option>
            </select>
          </td>
          <td style="background-color:rgba(255, 255, 255, 1);">
            <div style="vertical-align:middle;">
              <span id="errs" style="color: #ff1022"></span>
            </div>
          </td>
        </tr>
        <tr>
          <td style="text-align: center" class="v-label">权限:</td>
          <td class="content" style="text-align:left;height:66px;">

            <select id="adStatus"
                    class="form-control" style="text-align: center;width: 301px;margin-left:8px">
              <option value="E_OPERATOR" selected>运营人员</option>
            </select></td>
          <td style="vertical-align:middle;">
            <div style="float: left;margin-left: -10%;">
              <span id="erras" style="color: #ff1022"></span>
            </div>
          </td>
        </tr>
        </tbody>
      </table>
      <!--  保存和取消按钮 -->
      <div style="margin-top: 2%">
        <button type="button"
                style="background: #58c394; color: #fff; width: 100px; border-color: #58c394; font-size: 15px;"
                class="btn btn-info">保存
        </button>
        <button style="width: 100px; background: none; color: #58c394; border-color: #58c394"
                @click="cancel"   class="btn btn-deful">取消
        </button>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    name: "banner_edit",
    methods:{
      cancel(){
        console.log(this)
        var self = this
        self.$router.push({
          path: '/banner'
        })
      }
    }
  }
</script>

<style scoped>
  table th {
    text-align: left;
  }


  .tableBox tr:nth-child(odd) td {
    background: none;
  }
  .detail-table tr .label-td {
    width: 10%;
    text-align: left;
    color: #666666;
    line-height: 50px!important;
    font-size: 16px;
  }

  .tableBox td {
    margin-left:12px;
    border: 0px!important;
    text-align: center;
  }

  .searchTxt {
    width: 300px;
    /*   height: 35px;
      line-height: 35px; */
    box-sizing: border-box;
    border-radius: 5px;
    background: transparent;
    border: 1px solid #CCCCCC;
    outline: none;
    font-size: 16px;
  }


  .detail-table tr td {
    height:0px!important;
    padding:8px;
    border-bottom: 1px dashed #e8e8e8;
  }

  .detail-table tr .label-td {
    width: 8%;
    /*     text-align: left; */
    color: #666666;
    line-height: 50px!important;
    font-size: 16px;
  }

  .detail-table tr .content {
    padding-left:0px!important;
    line-height: 50px!important;
    color: #222222;
    font-size: 17px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .detail-table {
    width: 100%;
    margin: 0 auto;
    border-collapse: collapse;
    border: none;
    font-size: 1rem;
    margin-bottom: 0px;
    border-bottom: 1px solid #ccc;

  }
  .v-label {
    color: #666666;
    line-height: 45px!important;
    font-size: 16px;
    width: 10%;
    text-align: right;
  }
</style>
